<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="hotcss" content="initial-dpr=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0" />
    <meta content="telephone=no,email=no” name=”format-detection" />
    <meta name="format-detection" content="telephone=no">
    <title>我要装修</title>
    <link href="__STATIC__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__STATIC__/css/swiper-3.4.2.min.css" rel="stylesheet">
	<link href="__STATIC__/css/share.css" rel="stylesheet">
    <script type="text/javascript" src="__STATIC__/js/jquery-2.1.4.js"></script>
    <script type="text/javascript" src="__STATIC__/js/swiper-3.4.2.jquery.min.js"></script>
</head>
<body>
<div class="zx">
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_01.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_02.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_03.jpg" />
	</div>
	<div class="zxform">
		<div class="container">
			<div class="forminput">
				<input type="text" name="mianji" id="mianji" placeholder="请输入房屋面积:" />
			</div>
			<div class="forminput">
				<input type="text" name="mobile"  id="mobile" placeholder="报价结果将发送到您的手机:" />
			</div>
			<div class="formbtn">
				<a href="javascript:;" id="submitForm">免费获取设计服务</a>
			</div>
			<div class="tips">* 您的输入信息将会被保密处理，请放心填写</div>
		</div>
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_05.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_06.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_07.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_08.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_09.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_10.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_12.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_13.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_14.jpg" />
	</div>
	<div class="pic">
		<img src="__STATIC__/images/zx/zx_15.jpg" />
	</div>
	<div class="zx-btn">
		<img src="__STATIC__/images/zx/zx_16.jpg" />
	</div>
</div>
<script src="__STATIC__/js/layer/layer.js"></script>
<script>
    $("#submitForm").click(function () {
		var mianji = $('#mianji').val();
		if(!mianji) {
			layer.msg('请填写房屋面积');return false;
		}
		var mobile = $('#mobile').val();
		if(!mobile || !isPhoneNo(mobile)){
			layer.msg('请填写正确的手机号');return false;
		}
		var input_val = {
            contacts: "推广页",
			mianji: mianji,
            mobile: mobile
        };	
        $.ajax({
            type: "post",
            url: "/Freedbook/",
            data: input_val,
            success: function (result) {
                if (result.status === 1) {
					 layer.msg(result.info);
					 $('#mianji').val('');
					 $('#mobile').val('');
					 
                }else{
					layer.msg(result.info);
				}
            }
        });
    });
	function isPhoneNo(phone) {
        var pattern = /^1[345789]([0-9]{9})$/;
        return pattern.test(phone);
    }
</body>
</html>